package com.bookm;

import com.bookm.bean.Book;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Import;

@Import(Book.class)
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class BookMApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(BookMApplication.class);
//        boolean book22 = run.containsBean("com.bookm.book");
        String[] beanNamesForType = run.getBeanNamesForType(Book.class);
        for (String s : beanNamesForType) {
            System.out.println(s);
        }
    }
}
